<template>
    <div class="section-wrap">
        <div class="form-section">
            <div class="form-item form-item-style1">
                <div class="label-title">
                    <label>职业病</label>
                </div>
                <group>
                    <div>
                        <input type="text"
                               disabled
                               v-model="listArr.JobDisease">
                    </div>
                </group>
            </div>
            <div class="form-item form-item-style1">
                <div class="label-title">
                    <label>职业病类型</label>
                </div>
                <group>
                    <div>
                        <input type="text"
                               disabled
                               v-model="listArr.DiseaseKind">
                    </div>
                </group>
            </div>
            <div class="form-item form-item-style1">
                <div class="label-title">
                    <label>是否存在职业病</label>
                </div>
                <group>
                    <div>
                        <input type="text"
                               disabled
                               v-model="listArr.IsJobDisease">
                    </div>
                </group>
            </div>
            <div class="form-item form-item-style1">
                <div class="label-title">
                    <label>体检时间</label>
                </div>
                <group>
                    <div>
                        <input type="text"
                               disabled
                               v-model="listArr.CheckDate">
                    </div>
                </group>
            </div>
            <div class="form-item-style2">
                <div>
                    <label>附件</label>
                </div>
                <div>
                    <img :src="listArr.Photo"
                         v-if="listArr.Photo"
                         alt="">
                    <img src="../../../assets/nopic.png"
                         v-else
                         alt="">
                </div>
            </div>
            <myMenu></myMenu>
        </div>
    </div>
</template>

<script type="text/javascript">
import upload from '../../../commonComponents/upload/index2'
import { Tab, TabItem } from 'vux'
import { healthDetail } from '@/api/api'
import myMenu from '@/commonComponents/menu'
export default {
    components: {
        Tab,
        TabItem,
        upload,
        myMenu
    },
    data () {
        return {
            listArr: {},
            param: {
                allowPaging: true,
                data: {
                    id: 'c4a59478-1bd7-4b55-bebd-37201ed4c84a'
                },
                pageIndex: 0,
                pageSize: 1000
            }
        }
    },
    created () {
        this.param.data.id = this.$route.query.id
    },
    mounted () {
        this.dataArr()
    },
    methods: {
        // 主要数据
        dataArr () {
            healthDetail(this.param).then((res) => {
                console.log(res, 123)
                if (res.code === 0) {
                    this.listArr = res.data
                }
            })
        }
    }
}
</script>
<style lang="less" scoped>
.form-item-style2 {
    padding-left: 20px;
    label {
        font-size: 14px;
        color: #666;
        font-weight: bold;
    }
    img {
        margin-right: 10px;
        margin-top: 10px;
        width: 86px;
        height: 80px;
    }
}
</style>
